package com.qianya.model.pojo.sys.qo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qianya.model.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 登录日志
 * </p>
 *
 * @author lhl
 * @since 2020-06-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SysLogQO对象", description="登录日志")
public class SysLogQO extends BaseEntity {


    private static final long serialVersionUID = 3230616586953431315L;
    @ApiModelProperty(value = "日志id")
    @TableId(value = "ID", type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "用户账号")
    @TableField("USERNAME")
    private String username;


    @ApiModelProperty(value = "登录类型（0管理员登录，1普通用户登录,2是异常日志 3.查询普通用户和管理员所有登录日志）")
    @TableField("LOG_TYPE")
    private Integer logType;

    @ApiModelProperty(value = "用户账号")
    @TableField("USERID")
    private String userid;

    @ApiModelProperty(value = "返回结果（空字符串代表登录成功，否则返回失败信息）")
    @TableField("RESULT")
    private String result;

    @ApiModelProperty(value = "登录时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date beginTime;

    @ApiModelProperty(value = "登录日期")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date endTime;


}
